package com.wcbdota.list;

import java.util.ArrayList;
import java.util.HashMap;

import android.content.Context;
import android.widget.SimpleAdapter;

import com.wcbdota.R;

public class MenuAdapterList {

	/** 菜单图片 **/
	int[] menu_image_array = { R.drawable.menu_hero,R.drawable.menu_equip,R.drawable.menu_information,R.drawable.menu_sou,R.drawable.menu_menu,R.drawable.iconb};
	/** 菜单文字 **/
	String[] menu_name_array = { "英雄之家", "装备天地", "游戏资讯","社区论坛" ,"设置", "更多"};
	
	public SimpleAdapter getMenuAdapter(Context context) {
		ArrayList<HashMap<String, Object>> data = new ArrayList<HashMap<String, Object>>();
		for (int i = 0; i < menu_name_array.length; i++) {
			HashMap<String, Object> map = new HashMap<String, Object>();
			map.put("itemImage", menu_image_array[i]);
			map.put("itemText", menu_name_array[i]);
			data.add(map);
		}
		SimpleAdapter simperAdapter = new SimpleAdapter(context, data,
				R.layout.menutest_item_menu, new String[] { "itemImage", "itemText" },
				new int[] { R.id.item_image, R.id.item_text });
		
		return simperAdapter;
	}
}
